package com.push_label.server;

import com.push_label.bean.sys_user.SysUserInfo;
import com.push_label.mapper.SysUserMapper;
import lombok.extern.slf4j.Slf4j;

import org.springframework.stereotype.Service;


import javax.annotation.Resource;


@Service
@Slf4j
public class UserServiceImpl implements UserService {

    @Resource
    SysUserMapper sysUserMapper;

    @Override
    public SysUserInfo selectUserInfoByUsername(String username) {
        log.debug("查询用户信息，用户名: {}", username);
        SysUserInfo userInfo = sysUserMapper.selectUserInfoByUsername(username);
        log.debug("查询结果: 用户ID={}, 用户名={}, 用户编码={}",
                userInfo != null ? userInfo.getUser_id() : "null",
                userInfo != null ? userInfo.getUser_name() : "null",
                userInfo != null ? userInfo.getUser_code() : "null");
        return userInfo;
    }
}
